package cn.bonoon.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 如果数据有异常的，则会把这些数据集合起来，生成一个导出的记录；
 * 用户可以直接在界面上看到这些异常的数据
 * @author jackson
 *
 */
@Entity
@Table(name = "t_rdtexport", catalog = "db_rawdata")
public class RawdataExportEntity extends RawdataImportExportEntity{
	
	private static final long serialVersionUID = 8492743064820060231L;

	/** 如果是导出被标注的数据时，这个值可能为空，因为被标注的数据可能来自于多个文件 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "R_SUBJECT_ID")
	private RawdataImportEntity subject;

	/** 被导出的次数 */
	@Column(name = "C_DOWNLOADCOUNT")
	private int downloadCount;
	
	/** 导出时的文件名 */
	@Column(name = "C_DOWNLOADNAME", length = 500)
	private String downloadName;

	public RawdataImportEntity getSubject() {
		return subject;
	}

	public void setSubject(RawdataImportEntity subject) {
		this.subject = subject;
	}

	public int getDownloadCount() {
		return downloadCount;
	}

	public void setDownloadCount(int downloadCount) {
		this.downloadCount = downloadCount;
	}

	public String getDownloadName() {
		return downloadName;
	}

	public void setDownloadName(String downloadName) {
		this.downloadName = downloadName;
	}
}
